import Vue from 'vue';
import Vuex from 'vuex';
import hhf from './modules/hhf'
import hc from './modules/hc'
Vue.use(Vuex);

const state = {
    openid: "oLBr30oH1UhVQRcj2XIMxtSlIxQE", //zzy
    // openid:'oLBr30uBvYEa71wCR7C1u_dvg3t8', //xz
    // openid: 'oLBr30ncGnfLOhAYSmA6s4DoaAAw', //qlb
    // openid: "oLBr30gPoJjajBxACDe3veXBlzrQ", //hwz
    // openid: "oLBr30p1TK6D_g4c4zLhdCOOs60I", //cfc
    wxid: "41",
    date: "2018/2/28",
    HbusinessType: "0",
    HbusinessId: "",
    HtzType: "",
    HqxId: "",
    fwqId: "",
    finId: "",
    useName: "朱梓毅",
    overHidden: false,
    zIndex: 10,
    // openid: "",
    // wxid: "",
    // date: "",
    // HbusinessType: "",
    // HbusinessId: "",
    // HtzType: "",
    // HqxId: "",
    // fwqId: ""
};

const mutations = {
    mutateChangeHidden (state) {
        state.overHidden = !state.overHidden
    },
    mutateChangeZIndex (state, obj) {
        state.overHidden = obj.overHidden 
        if (obj.zIndex !== undefined) {
            state.zIndex = obj.zIndex 
        }
    },
    getOpenid(state, a) {
        state.openid = a;
    },
    getWxid(state, a) {
        state.wxid = a;
    },
    getfwqid(state, a) {
        state.fwqid = a;
    },
    getdate(state, a) {
        state.date = a;
    },
    getHbusinessId(state, a) {
        state.HbusinessId = a;
    },
    getHtzType(state, a) {
        state.HtzType = a;
    },
    getHqxId(state, a) {
        state.HqxId = a;
    },
    getfwqId(state, a) {
        state.fwqId = a;
    },
    getHbusinessType(state, a) {
        state.HbusinessType = a;
    },
    getfinId(state, a) {
        state.finId = a
    },
    getuseName(state, a) {
        state.useName = a
    }
};

export default new Vuex.Store({
    state,
    mutations,
    modules: {
        hhf, hc
      }
});
